Conversation
…6-0097 Two root causes for the failing Security Audit CI job: 1. rustsec/audit-check@v2.0.0 requires checks:write permission to post check-run results. The workflow only had contents:read, causing: "Resource not accessible by integration" Fix: add permissions.checks:write to the audit job only. 2. rand v0.8.5 is flagged as unsound by RUSTSEC-2026-0097. Fix: cargo update -p rand bumps the lockfile to rand v0.8.6 (patched version per the advisory). Agent-Logs-Url: https://github.com/oneirosoft/dagger/sessions/1c44b64d-2291-4e22-b805-fd947d2fca35 Co-authored-by: mark-pro <20671988+mark-pro@users.noreply.github.com>
mark-pro
approved these changes
May 5, 2026
Copilot
AI
changed the title
[WIP] Investigate and fix CI/CD failure in audit job
fix: grant checks:write to audit job and patch RUSTSEC-2026-0097 (rand 0.8.5 → 0.8.6)
May 5, 2026
mark-pro
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CI Security Audit job was failing for two independent reasons:
rustsec/audit-check@v2.0.0requireschecks: writeto post check-run results (was getting a 403), andcargo auditwas flaggingrand 0.8.5as unsound via RUSTSEC-2026-0097.Workflow permissions
Added
checks: writescoped to theauditjob only, keeping the global default minimal:Dependency fix
rand 0.8.5is unsound under RUSTSEC-2026-0097 (aliased mutable reference inThreadRngwhen a custom logger callsrand::rng()during reseed). Patched in≥ 0.8.6.randenters the graph transitively:ratatui → termwiz/csscolorparser → phf → phf_generator → rand.Updated
Cargo.lockviacargo update -p rand— noCargo.tomlchanges needed, semver-compatible within the existing constraint.Original prompt
Investigate and fix the CI/CD failure in repository
oneirosoft/daggerwith the smallest possible targeted change set.Context:
mainis run24963060628for commit17c83af2315a636e5f804a9e289b6af4de7ed7cb..github/workflows/ci.yml.verifyjob appears to build and test normally.audit/Security Auditjob.contents: readrustsec/audit-check@v2.0.0and the failing log includes:No vulnerabilities were foundFound 1 unsoundResource not accessible by integration - https://docs.github.com/rest/checks/runs#create-a-check-runGoals:
Constraints:
Found 1 unsoundresult before concluding.Validation expectations:
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: You are an expert code analyst and software engineer. Can you look at why CI/CD is failing for the project. Then, after careful inspection, provide an explanation and a plan to address the failure.
Assistant: I’ll inspect the repository’s GitHub Actions runs and logs, then trace the failing workflow steps to identify the root cause and propose a fix plan.
Assistant: I found the failure.
What’s failing
The latest failing CI run is the push-to-
mainrun for commit17c83af2315a636e5f804a9e289b6af4de7ed7cb:.github/workflows/ci.ymlRoot cause
The failure is in the Security Audit job, not the build/test job.
From the job log for commit
17c83af2315a636e5f804a9e289b6af4de7ed7cb:No vulnerabilities were foundFound 1 unsoundResource not accessible by integration - https://docs.github.com/rest/checks/runs#create-a-check-runThis means:
cargo-audititself is running.rustsec/audit-check@v2.0.0tries to create a GitHub Check Run, but the workflow only grants:contents: readIn
.github/workflows/ci.yml, the top-level permissions are:permissions: contents: readBut creating a check run requires
checks: write.Why this is a little misleading
There are actually two issues, but only one is the immediate workflow/config failure:
1. Workflow permissions misconfiguration
The action is attempting to publish results as a check run and lacks permission. That causes the explicit GitHub Actions error:
Resource not accessible by integration2. Dependency audit is also reporting a real advisory
The log also says:
Found 1 unsoundSo even if you fix permissions, the audit job may still remain red until the flagged dependency is upgraded, ignored with justification, or otherwise addressed.
Evidence in repo
Workflow:
.github/workflows/ci.ymlRelevant lines:
rustsec/audit-check@v2.0.0contents: readPlan to address it
Immediate fix: correct workflow permissions
Update the workflow permissions to allow check creation. For example:
If you want to scope it more tightly, you can leave top-level permissions minimal and set
checks: writeonly on theauditjob.Next fix: identify the unsound dependency
The audit output shown in the log is truncated before the advisory package name, so the next step is to reproduce locally or rerun wit...
This pull request was created from Copilot chat.